package com.zhanglijie.base.sync.Lock;

import java.lang.reflect.Field;

import sun.misc.Unsafe;

/**
 * @author zhanglijie
 * @version 1.0
 * @since 1.1.0 2022/6/10 0010 23:46
 */
public class MyUnsafe {
    public static Unsafe getUnsafe(){
        Field field = null;
        try{
            field = Unsafe.class.getDeclaredField("theUnsafe");
            field.setAccessible(true);
            return (Unsafe)field.get(null);
        }catch (Exception e){

        }
        return null;

    }


}
